package com.mlt.back.service.impl;

import com.mlt.back.beans.Good;
import com.mlt.back.dao.GoodDao;
import com.mlt.back.dao.impl.GoodDaoImpl;
import com.mlt.back.service.GoodService;

import java.util.List;
//实现接口
public class GoodServiceImpl implements GoodService {

    private GoodDao goodDao = new GoodDaoImpl();

    @Override
    public List<Good> listByCategory(String categoryId) {
        return goodDao.selectByCategory(categoryId);
    }

    @Override
    public List<Good> list() {
        return goodDao.selectAll();
    }
}
